mkelf32 explicit-size types are based on defs in inttypes.h.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 12:30:19 +0000 (12:30 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 12:30:19 +0000 (12:30 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/boot/mkelf32.c

index 4b7515c8cc7b75c4b1ec6e593519a1301c6884c2..8fb665e0688587f77ef29e8ba0478a8f1a92e717 100644 (file)
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-
-/*
- * Here I'm taking care not to conflict with possible typedef's in
- * standard headers by instead using the macro namespace.
- */
-#undef u8
-#undef u16
-#undef u32
-#undef u64
-#undef s8
-#undef s16
-#undef s32
-#undef s64
-#define u8  unsigned char
-#define u16 unsigned short
-#define u32 unsigned int
-#define s8  signed char
-#define s16 signed short
-#define s32 signed int
-#if defined(__i386__)
-#define u64 unsigned long long
-#define s64 signed long long
-#else
-#define u64 unsigned long
-#define s64 signed long
-#endif
-
+#include <inttypes.h>
+
+#define u8  uint8_t
+#define u16 uint16_t
+#define u32 uint32_t
+#define u64 uint64_t
+#define s8  int8_t
+#define s16 int16_t
+#define s32 int32_t
+#define s64 int64_t
 #include "../../../include/xen/elf.h"
 
 #define DYNAMICALLY_FILLED   0